package com.haidao.admin.component.service.thirdpart.impl;

import com.haidao.admin.component.service.thirdpart.CryptoService;
import com.haidao.admin.component.service.thirdpart.IJiDaService;
import com.haidao.admin.component.service.thirdpart.SignatureService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

@Service
public class JiDaServiceImpl implements IJiDaService {
    @Qualifier("secondAreaCryptoServiceImpl")
    @Autowired
    private CryptoService cryptoService;
    @Qualifier("secondAreaSignatureServiceImpl")
    @Autowired
    private SignatureService signatureService;


    @Override
    public String signature(String str) {
        return signatureService.signature(str);
    }

    @Override
    public boolean verify(String str, String signature) {
        return signatureService.verify(str, signature);
    }

    @Override
    public String encrypt(String str) {
        return cryptoService.encrypt(str);
    }

    @Override
    public String decrypt(String str) {
        return cryptoService.decrypt(str);
    }
}
